home *** CD-ROM | disk | FTP | other *** search
- --------------------------------------------------------------------------------
- -- Weapon Mine Drop
- -- Original Carnage Contest Weapon
- -- Script by DC, July 2010, www.UnrealSoftware.de
- --------------------------------------------------------------------------------
-
- -- Setup Tables
- if cc==nil then cc={} end
- cc.minedrop={}
- cc.minedrop.cluster={}
-
- -- Load & Prepare Ressources
- cc.minedrop.gfx_wpn=loadgfx("weapons/rc.bmp") -- Weapon Image
- setmidhandle(cc.minedrop.gfx_wpn)
- cc.minedrop.gfx_icon=loadgfx("weapons/minedrop.png") -- Weapon Icon
- setmidhandle(cc.minedrop.gfx_icon)
- cc.minedrop.sfx_attack=loadsfx("airstrike.ogg") -- Attack Sound
-
- --------------------------------------------------------------------------------
- -- Weapon: Mine Drop
- --------------------------------------------------------------------------------
-
- cc.minedrop.id=addweapon("cc.minedrop","Mine Drop",cc.minedrop.gfx_icon,0,2) -- Add Weapon (0 uses, first in round 2)
-
- function cc.minedrop.draw() -- Draw
- setblend(blend_alpha)
- setalpha(1)
- setcolor(255,255,255)
- drawinhand(cc.minedrop.gfx_wpn,7,0)
- -- HUD Positioning
- if weapon_shots==0 then
- hudpositioning(pos_invisible)
- end
- end
-
- function cc.minedrop.attack(attack) -- Attack
- if (weapon_shots<=0) and (weapon_position==1) then
- -- No more weapon switching!
- useweapon(0)
- playsound(cc.minedrop.sfx_attack)
- weapon_shots=weapon_shots+1
- -- Attack
- for i=-2,2,1 do
- createobject(o_mine,weapon_x+i*40,-100)
- end
- -- End Turn
- endturn()
- end
- end